package com.wy.powerbuilder.mapper.lwg;

import com.github.pagehelper.PageInfo;
import com.wy.powerbuilder.entity.lwg.houses;
import com.wy.powerbuilder.entity.lwg.owner;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface housesMapper {

   /* @Select("SELECT houses.`h_number`, OWNER.`o_name`, houses.`h_bulidingName`,houses.`h_unitNumber`,houses.`h_floor`,houses.`h_type`,houses.`h_direction`,houses.`h_area`,houses.`h_remarks`,houses.`h_area` FROM OWNER, houses\n" +
            "    WHERE OWNER.o_number = houses.h_number")*/


    //删除
    @Delete("delete from houses where h_id=#{h_id}")
    public int delete(Integer o_id);
    //添加
    @Insert("INSERT INTO `houses` VALUES (NULL,#{h_number},#{h_state},#{h_bulidingName},#{h_unitNumber},#{h_floor},#{h_type},#{h_direction},#{h_area},#{h_remarks})")
    int  addUser(houses Houses);
    PageInfo<houses> selByPage(Integer pageNo, Integer pageSize);
    houses house(int h_id);


    houses zuih(int h_number);
    /*页面的查询  和 业主表的连表查询*/
    List<houses> bll(String h_unitNumber);
    /*单查houses表的所有数据模糊查询*/
    List<houses> bbll(String h_state);

    Integer uphstate(houses house);

    List<houses> linn();



}
